<?php

/**
 * Description of redis
 *
 * @author libaoling
 * @time 2014-11-11
 */
class NosqlRedis
{
    private static $redis = null;

    private function __construct(){}
    
    public static function getInstance($host, $port)
    {
        if(!self::$redis){
            self::$redis = new Redis();
            self::$redis->connect($host, $port);
            self::$redis->select(1);
        }
        
        return self::$redis;
    }
    
}
